
cmake_minimum_required (VERSION 2.8)
project (threadpool)

# 设置生成的二进制文件放在bin目录下
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

# cmake支持C++11
add_compile_options(-std=c++11)

# 设置debug模式，如果没有这一行将不能调试设断点
set(CMAKE_BUILD_TYPE "Debug")

set(POOL_SRC thread.cc threadpool.cc)
# 生成threadpool的so动态库

add_library (threadpool SHARED ${POOL_SRC})